ARDK for Android/com.nianticlabs.ardk.objectdetection/ObjectDetectionSession/calculateViewportMapping
calculateViewportMapping
[androidJvm]
fun calculateViewportMapping(viewportSize: Size, orientation: Orientation): Matrix?
Compute a transform Matrix that maps detection boxes from model frame coordinates into viewport coordinates.
Return
A Matrix mapping from model space → source image frame space → viewport space.
Parameters
androidJvm
| viewportSize | The dimensions of the Compose/Android view you are drawing into. |
| orientation | The current UI Orientation. |